package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.FoundGoodContentBeen;
import cn.xfdzx.android.apps.shop.bean.MarketBottomBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface MarketBottomContract {
    interface Model {

        Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum);

        Flowable<FoundGoodContentBeen> initContent(String index_category_id, String page, String limit);

    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);


        void onInitContentSuccess(FoundGoodContentBeen bean);

        void onAddCarSuccess(ConfirmGoodBeen bean, int position, int total_num);
        /**
         * 刷新完成
         */
        void finishRefresh();

        /**
         * 加载完成
         */
        void finishLoadMore();
    }

    interface Presenter {
        /**
         *
         */
        void addCar(String is_new, String uniqueId, String productId, String cartNum, int position, int total_num);

        void initContent(boolean isRefresh, boolean isLoading, String index_category_id, String page, String limit);
    }
}
